<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<link rel="stylesheet" type="text/css" media="screen"
		href="resources/style.css" />
	<title>E-PRODUÇÃO</title>
</h:head>
<h:body>

	<p:layout fullPage="true">

		<p:layoutUnit position="north" size="70">
			<ui:include src="cabecalho.xhtml" />
		</p:layoutUnit>

		<p:layoutUnit position="west" size="200" resizable="false"
			closable="false" collapsible="false">
			<ui:include src="Menu.xhtml" />
		</p:layoutUnit>

		<p:layoutUnit position="center" header="Busca de Risco"
			style="width: 760px;">

			<h:form id="form">

				<p:growl id="MSG_ERRO" showDetail="false" sticky="true" />

				<div align="center">
					<div style="width: 760px; margin: 0 auto; text-align: left;">

						<p:panel id="panelCampos" header="Filtros de Preenchimentos"
							visible="true" style="width: 760px;">

							<h:panelGrid columns="2">

								<h:outputLabel value="Descrição" />
								<p:inputText label="Descrição" maxlength="70"
									value="#{BuscarRisco.descr}" size="35" />

							</h:panelGrid>
						</p:panel>
						<p:panel id="panelBotoes" header="Botões de Ação" visible="true"
							style="width: 760px;">
							<h:panelGrid columns="4"
								style="margin-left: 30%;margin-rigth: 30%;">
								<p:commandButton value="Buscar" ajax="false" action="#{BuscarRisco.buscarRiscos}" />
								<p:commandButton value="Limpar" ajax="false" />
								<p:commandButton value="Voltar" ajax="false"
									action="#{BuscarRisco.Voltar}" />
							</h:panelGrid>
						</p:panel>
						<p:panel id="panelQuatro" visible="true" style="width: 760px;">
							<p:dataTable id="Riscos" var="risco" emptyMessage="Nenhum Registro Encontrado"
								value="#{BuscarRisco.listRiscos}" rowKey="risco.codRisco"
								>
								<f:facet name="header">  
							            Resultado de Pesquisa 
							        </f:facet>

								<p:column headerText="Codigo" style="text-align:center;width: 20px;">  
							              #{risco.codRisco}
							        </p:column>

								<p:column headerText="Descrição" style="text-align:center;">  
											#{risco.descRisco}							              
							        </p:column>

								<p:column headerText="***" style="text-align:center;width: 20px;">
									<p:commandButton value="Ok"
										action="#{BuscarRisco.Carregar}" ajax="false">
										 <f:setPropertyActionListener value="#{risco}" target="#{BuscarRisco.selectRisco}" />
										</p:commandButton>
										 
								</p:column>


							</p:dataTable>
						</p:panel>
					</div>
				</div>

			</h:form>

		</p:layoutUnit>
	</p:layout>

</h:body>
</html>